package com.haowang.camera.manager;

import java.util.ArrayList;
import java.util.List;

import com.haowang.camera.activity.CameraActivity;

public abstract class CameraManagerBase {

	protected CameraActivity mActivity;
	private static List<CameraManagerBase> managers = new ArrayList<CameraManagerBase>();

	protected CameraManagerBase(CameraActivity activity) {
		mActivity = activity;
		managers.add(this);
	}

	public CameraManagerBase() {
		managers.add(this);
	}
	
	public void init() {
	}
	
	protected void reset() {
	}

	public static void resetAllManagers() {
		if (managers.size() <= 0) {
			return;
		}
		for (CameraManagerBase m : managers) {
			m.reset();
			m = null;
		}
		managers.clear();
	}
}
